{include file="errors.tpl"}
{if $WEB_APP.correct_answer_message neq ""}
<div id="correct">{$WEB_APP.correct_answer_message}</div>
<br>
{/if}

{$text.txt_the_testing_is_over}<br>
{$text.txt_test}: {$WEB_APP.test_name}<br><br>

{if $WEB_APP.is_show_results_message eq 1}
	{if $WEB_APP.settings.tst_showstats}
		<h1>{$text.txt_statistics}</h1>
		{include file="table_header.tpl" columns=$WEB_APP.stat_columns}
		{include file="table_rows.tpl" items=$WEB_APP.stat columns=$WEB_APP.stat_columns}
		{include file="table_footer.tpl" columns_count=$WEB_APP.stat_columns_count}
		<br>
	{/if}

	{if count($WEB_APP.user_result_themes) neq 0}
		{assign var="tmp" value="1"}
		{foreach from = $WEB_APP.user_result_themes item = item name=foreach_row}
			{if $tmp eq 2}
				{assign var="tmp" value="1"}
			{else}
				{assign var="tmp" value="2"}
			{/if}
			{if $item.name eq "header"}
			<table width = "100%" border = "0" cellspacing = "0" cellpadding = "0">
			<tr id = "head" valign = "top">
				<td class = "leftborder" width = "6"><img src = "{$WEB_APP.images_dir}btlg.gif" alt=""></td>
				<td class = "col" colspan = 2>{$item.value|escape}</td>
				<td class = "rightborder" width = "6"><img src = "{$WEB_APP.images_dir}btrg.gif" alt=""></td>
			</tr>
			{else}
			<tr class = "line{$tmp}">
				<td class = "leftborderw"></td>
				<td class="namecol" height="30" class = "namecol" width = "30%">{$item.name|escape|email}:</td>
				<td class="namecol" height="30" class = "namecol" width = "70%">{$item.value}</td>
				<td class = "rightborderw"></td>
			</tr>
			{/if}
		{/foreach}
			<tr>
				<td><img src = "{$WEB_APP.images_dir}bbl.gif"></td>
				<td class = "bottomborder" colspan = "2"></td>
				<td><img src = "{$WEB_APP.images_dir}bbr.gif"></td>
			</tr>
		</table>
		<br>		
	{/if}

	{if $WEB_APP.settings.tst_showrating}
		<h1>{$text.txt_rating}</h1>
		{include file="table_header.tpl" columns=$WEB_APP.columns}
		{include file="table_rows.tpl" items=$WEB_APP.rows columns=$WEB_APP.columns}
		{include file="table_footer.tpl" columns_count=$WEB_APP.columns_count}
	{/if}
{/if}
